package com.forever7776.life.core.entity.blog;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import java.io.Serializable;

/**
 * <p>
 * 博客主表
 * </p>
 *
 * @author kz
 * @since 2018-02-10
 */
public class Blog extends Model<Blog> implements Serializable{

    private static final long serialVersionUID = 1L;

    /**
     * 博客ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 用户ID(默认为系统博客)
     */
    @TableField("user_id")
    private String userId;
    /**
     * 博客标题
     */
    private String title;
    /**
     * 博客摘要
     */
    private String abstracts;
    /**
     * 博客封面
     */
    private String banner;
    /**
     * 博客类型表ID
     */
    @TableField("blog_type_id")
    private String blogTypeId;
    /**
     * 是否对平台开放(0:否 1：是)
     */
    private Integer openup;
    /**
     * 状态（0：系统下线 1：正常）
     */
    private Integer status;
    /**
     * 审核状态（0：审核通过 1：审核不通过）
     */
    private Integer type;

    @TableField("recommend_type")
    private Integer recommendType;

    @TableField("recommend_date")
    private Date recommendDate;

    /**
     * 首页轮播
     */
    @TableField("carousel_type")
    private Integer carouselType;

    @TableField("insert_date")
    private Date insertDate;
    @TableField("last_date")
    private Date lastDate;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAbstracts() {
        return abstracts;
    }

    public void setAbstracts(String abstracts) {
        this.abstracts = abstracts;
    }

    public String getBanner() {
        return banner;
    }

    public void setBanner(String banner) {
        this.banner = banner;
    }

    public String getBlogTypeId() {
        return blogTypeId;
    }

    public void setBlogTypeId(String blogTypeId) {
        this.blogTypeId = blogTypeId;
    }

    public Integer getOpenup() {
        return openup;
    }

    public void setOpenup(Integer openup) {
        this.openup = openup;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getRecommendType() {
        return recommendType;
    }

    public void setRecommendType(Integer recommendType) {
        this.recommendType = recommendType;
    }

    public Date getRecommendDate() {
        return recommendDate;
    }

    public void setRecommendDate(Date recommendDate) {
        this.recommendDate = recommendDate;
    }

    public Integer getCarouselType() {
        return carouselType;
    }

    public void setCarouselType(Integer carouselType) {
        this.carouselType = carouselType;
    }

    public Date getInsertDate() {
        return insertDate;
    }

    public void setInsertDate(Date insertDate) {
        this.insertDate = insertDate;
    }

    public Date getLastDate() {
        return lastDate;
    }

    public void setLastDate(Date lastDate) {
        this.lastDate = lastDate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Blog{" +
        ", id=" + id +
        ", userId=" + userId +
        ", title=" + title +
        ", abstracts=" + abstracts +
        ", banner=" + banner +
        ", blogTypeId=" + blogTypeId +
        ", openup=" + openup +
        ", status=" + status +
        ", type=" + type +
        ", recommendType=" + recommendType +
        ", recommendDate=" + recommendDate +
        ", carouselType=" + carouselType +
        ", insertDate=" + insertDate +
        ", lastDate=" + lastDate +
        "}";
    }
}
